MEDIA_LIBRARY_INFO view

The MEDIA_LIBRARY_INFO view returns information that can also be seen through the Work with Media Library Status (WRKMLBSTS) command interface.

Authorization: None required.

The following table describes the columns in the view. The system name is MEDIA_INFO. The schema is QSYS2.

Table 1. MEDIA_LIBRARY_INFO view
Column Name System Column Name Data Type Description
DEVICE_NAME DEVICE VARCHAR(10) The name of the device.
DEVICE_STATUS DEVICE_STS VARCHAR(20) The status of the device. The most common values are:
VARIED ON
The media library device is varied on.
VARIED OFF
The media library device is varied off.
ACTIVE
The resource is currently in use by a job under this media library.
See List Configuration Descriptions API for a complete list of status values.
DEVICE_TYPE DEVICE_TYP VARCHAR(10) The type of device. Contains the special value *RSRCNAME if the device type is determined by the resource in the RESOURCE_NAME column.
DEVICE_MODEL DEVICE_MDL VARCHAR(10) The model number of the device. Contains the special value *RSRCNAME if the device model is determined by the resource in the RESOURCE_NAME column.
RESOURCE_NAME RESOURCE VARCHAR(10)
Nullable
The name of the resource.

Contains the null value if the DEVICE_STATUS column has a value of VARIED_OFF, or if the tape library does not have any associated tape resources.

RESOURCE_STATUS RSRC_STS VARCHAR(11)
Nullable
The status of the resource.
OPERATIONAL
The resource is working and the system can address the tape drive resource.
ACTIVE
The resource is currently in use by a job under this media library.
UNAVAILABLE
The resource is currently not available because it may be in use by another object, another client, or DST.
FAILED
The resource is not operational and the system can no longer communicate with that resource. A hardware problem may have occurred.

Contains the null value if the DEVICE_STATUS column has a value of VARIED_OFF, or if the tape library does not have any associated tape resources.

RESOURCE_ALLOCATION_STATUS ALLOCATION VARCHAR(11)
Nullable
Current allocation status for the resource.
ALLOCATED
For a tape media library device the resource is exclusively assigned to this system and cannot be accessed by another system. For an optical media library device the drive is available for use by this media library.
UNPROTECTED
A tape resource is not exclusively assigned to this system. This resource can be assigned to this system when no other system has already assigned the resource.
DEALLOCATED
For a tape media library the resource is not assigned to this system and is not available to respond to requests. For an optical media library the device is not available for use by this media library.
STAND-ALONE
A tape resource is not available. The tape resource is reserved by a varied on stand-alone tape device description for non-library mode use.
*UNKNOWN
An optical media library is varied off or failed. The current allocation for a resource cannot be determined.

Contains the null value if the DEVICE_STATUS column has a value of VARIED_OFF, or if the tape library does not have any associated tape resources.

RESOURCE_ALLOCATION
_PRIORITY
ALLOC_PRTY VARCHAR(4) The priority of a job when requesting a resource. 1 is highest priority, 99 is lowest. Can contain the following special value:
*JOB
The priority of the job is used as the resource allocation priority.
INITIAL_MOUNT_WAIT_TIME INIT_WAIT VARCHAR(6) The maximum amount of time a request will wait for allocation of a tape resource for the initial mount. Contains either a numeric string representing the number of minutes or one of the following special values:
*JOB
The allocation wait time is determined by the default wait time attribute of the job requesting the allocation, rounded up to the nearest minute.
*IMMED
The request will not wait for a tape resource to become available.
*NOMAX
The request will wait until a tape resource is available.
END_OF_VOLUME_MOUNT_WAIT
_TIME
END_WAIT VARCHAR(6) The maximum amount of time a request will wait for allocation of a tape resource for the end of volume mount. Contains either a numeric string representing the number of minutes or one of the following special values:
*JOB
The allocation wait time is determined by the default wait time attribute of the job requesting the allocation, rounded up to the nearest minute.
*IMMED
The request will not wait for a tape resource to become available.
*NOMAX
The request will wait until a tape resource is available.
DEVICE_DESCRIPTION DEVICE_DES VARCHAR(50) The text description of the device.

Example

Return information about all media library devices.

SELECT * FROM QSYS2.MEDIA_LIBRARY_INFO